package cn.tedu.charging.device.controller;

import cn.tedu.charging.device.service.GunService;
import cn.tedu.common.pojo.JsonResult;
import cn.tedu.common.pojo.param.GunStatusUpdateParam;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;

@Slf4j
@RestController
@RequestMapping("/station")
public class GunController {

    private GunService gunService;
    public GunController(GunService gunService) {
        this.gunService = gunService;
    }
    @PutMapping("/gun/status/edit")
    public JsonResult<Boolean> editGunStatus(@RequestBody GunStatusUpdateParam param){
         log.debug("更新枪状态,入参:{}",param);
         Boolean flag=gunService.editGunStatus(param);
         log.debug("更新枪状态,出参:{}",flag);
         return JsonResult.ok(flag);
    }
}
